#ifndef __BSP_ADC_H
#define __BSP_ADC_H

#include "stm32f4xx_hal.h"

#define CALIBRATION_SAMPLES 5000  


typedef struct {
    int16_t offset_phaseA;  
    int16_t offset_phaseB;  
    int16_t offset_phaseC;  
    uint8_t offset_flag;    
} CurrentOffsets;


void bsp_adc_DataProc(ADC_HandleTypeDef *adc_handle);

void bsp_adc_CalibrateZeroOffset(void);

void bsp_adc_VbusCalculate(void);

#endif 

